﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using QLVMBAYDomain;

namespace QLVMBAY.AdControls
{
    public partial class adTop : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session[ClientComm.KEY_DANG_NHAP] != null)
                {
                    var ngDung = (NguoiDung)Session[ClientComm.KEY_DANG_NHAP];
                    lblTen.Text = ngDung.MaNguoiDung;
                }
                else
                {
                    Response.Redirect("~/Default.aspx");
                }
            }

        }

        protected void lnkDefault_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Default.aspx");
        }

        protected void lnkLogout_Click(object sender, EventArgs e)
        {
            Session[ClientComm.KEY_DANG_NHAP] = null;
            Response.Redirect("~/Default.aspx");
        }
    }
}